import { createRouter, createWebHistory } from 'vue-router';
import {customers} from "./customer.ts";
import {systemRouters} from "./system.ts";
import {othersRouters} from "./others.ts";
import NotFound from "../view/static/NotFound/index.vue";

const staticRouters = [
    {
        path: '/404', // 捕获所有未匹配的路由
        name: 'NotFound',
        component: NotFound
    },
    {
        path: '/:pathMatch(.*)*', // 捕获所有未匹配的路由
        name: 'NotFound',
        component: NotFound
    }
]

const routes = [
    ...staticRouters,
    ...systemRouters,
    ...customers,
    ...othersRouters,

];

const router = createRouter({
    history: createWebHistory(),
    routes
});

export default router;
